//引入express模块
const express = require('express')
//创建路由器对象
const router = express.Router()
//引入pool连接池对象
const pool = require("../mysql")


// 查询园林表下的所有数据
//接口  (get  /info)
//测试地址:http://127.0.0.1:3000/park/info
router.get("/list", (req, res, next) => {
    let sql = "select * from park ;";
    pool.query(sql, (err, result) => {
        if (err) {
            throw err
        }
        res.send(result )
    })
})

module.exports = router
